package gdou.gym.exception;

public enum StateCode implements MExceptionEnum {
    Insert_Error(501, "数据插入失败"),
    Authorization_ERROR(401, "请携带Authorization"),
    Authorization_NO_ENOUGH(401, "权限不足"),
    LOGIN_ERROR(800, "登录异常"),
    PARAMS_ERROR(1001, "参数有误"),
    SUCCESS(200, "成功"),
    TOKEN_ERROR(1000, "无token或token有误"),
    USER_AccountOrPswERROR(800, "用户名或密码错误，注意大小写"),
    NoDiscover_ERROR(555, "无目标数据"),
    UPDATE_ERROR(606, "数据更新失败"),
    TimeOut(114514, "连接超时"),
    USER_ERROR(1002, "用户不存在，请重新登录"),
    ORDER_ERROR(667, "余量不足，预约失败"),
    ORDER_CREATE_ERR(111, "订单生成失败"),
    Cancel_ERROR(99, "退订失败"),
    UserAccount_Error(300, "此用户名已经存在"),
    UserAccountState_Error(301, "用户已被封禁，请联系管理员"),
    ADD_ERROR(302, "添加失败"),
    SYSTEM_BUSY(502, "系统繁忙"),
    REQUEST_FAIL(503, "请求失败,请联系管理员"),
    ADMIN_ERROR(1002, "用户不存在，请重新登录");

    public Integer code;
    //提示信息
    public String message;

    //构造函数
    StateCode(Integer code, String message) {
        this.code = code;
        this.message = message;

    }


    //获取状态码
    @Override
    public Integer getCode() {
        return code;
    }

    //获取提示信息
    @Override
    public String getMessage() {
        return message;
    }


}
